﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true"
    CodeBehind="AWS.aspx.cs" Inherits="DentScan2.WebApp.AWS" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:MultiView runat="server" ID="mvAws" ActiveViewIndex="0">
        <asp:View runat="server" ID="vAws">
            <asp:DropDownList runat="server" ID="ddlAWMethods" DataTextField="MethodName" DataValueField="AWMethodId" AutoPostBack="True" OnSelectedIndexChanged="ddlAWMethods_SelectedIndexChanged"></asp:DropDownList>
            <asp:CheckBox runat="server" ID="cbActive" Text="Активен" AutoPostBack="True" OnCheckedChanged="cbActive_CheckedChanged" /><br />
            <asp:TextBox runat="server" ID="tbNewMethod" /><asp:Button runat="server" ID="bAddMethod" Text="Нов метод" OnClick="bAddMethod_Click"/><br />

            <asp:Button runat="server" ID="bNew" Text="Нов ред" OnClick="bNew_Click" />
            <asp:Repeater runat="server" ID="rAws" OnItemCommand="rAWS_ItemCommand">
                <HeaderTemplate>
                    <table border="1" width="100%">
                        <tr>
                            <td>
                                <p class="bold">
                                    Размер
                                </p>
                            </td>
                            <td>
                                <p class="bold">
                                    Брой
                                </p>
                            </td>
                            <td>
                                <p class="bold">
                                    AW
                                </p>
                            </td>
                            <td>
                                <p class="bold">
                                    Хоризонтален
                                </p>
                            </td>
                            <td>
                                <p class="bold">
                                    Активен
                                </p>
                            </td>

                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td>
                           
                            <%#Eval("SizeTo")%>
                        </td>
                        <td>
                             <asp:LinkButton runat="server" ID="lbEdit" CommandArgument='<%#Eval("AWId")%>'
                                CommandName="EDIT" Text='<%#Eval("Cnt")%>' />
                        </td>
                        <td>
                            <%#Eval("AW1")%>
                        </td>
                        <td>
                            <%#Eval("IsHorizontal").ToString()==true.ToString()?"Хоризонтален":"Вертикален"%>
                        </td>
                        <td>
                            <asp:LinkButton runat="server" ID="lbDeactivate" CommandArgument='<%#Eval("AwId")%>'
                                CommandName="DEACTIVATE" Text='<%#Eval("IsDel").ToString()==false.ToString()?"Да":"Не" %>'
                                OnClientClick="return confirm('Моля, потвърдете!');" />
                        </td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </table>
                </FooterTemplate>
            </asp:Repeater>
        </asp:View>
        <asp:View runat="server" ID="vEdit">
            <table>
                <tr>
                    <td>
                        <p class="bold">
                            Размер
                        </p>
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlSizeTo">
                            <asp:ListItem Selected="True" Value="1" Text="1" />
                            <asp:ListItem Value="2" Text="2" />
                            <asp:ListItem Value="3" Text="3" />
                            <asp:ListItem Value="4" Text="4" />
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="bold">
                            Брой
                        </p>
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlCnt" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="bold">
                            AW
                        </p>
                    </td>
                    <td>
                        <asp:DropDownList runat="server" ID="ddlAW" />
                    </td>
                </tr>
                <tr>
                    <td>
                        <p class="bold">
                            Хоризонтален
                        </p>
                    </td>
                    <td>
                        <asp:CheckBox runat="server" ID="cbHorizontal" />
                    </td>
                </tr>

                <tr>
                    <td>
                        <asp:Button runat="server" ID="bSave" Text="Запис" OnClick="bSave_Click" />
                    </td>
                    <td>
                        <asp:Button runat="server" ID="bCancel" Text="Отказ" OnClick="bCancel_Click" />
                    </td>
                </tr>
            </table>
        </asp:View>
    </asp:MultiView>
</asp:Content>
